package com.hdsx.jxcsxm.operate.server.impl;

import com.hdsx.dao.query.base.BaseOperate;
import com.hdsx.jxcsxm.operate.bean.ModuleBean;
import com.hdsx.jxcsxm.operate.bean.OperateBean;
import com.hdsx.jxcsxm.operate.bean.OperateParameter;
import com.hdsx.jxcsxm.operate.bean.ZjBean;
import com.hdsx.jxcsxm.operate.server.OperateServer;
import com.hdsx.jxcsxm.utile.SjbbMessage;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author 占贤银
 * time 2023/8/23 15:22
 * description 生命之灯因热情而点燃，生命之舟因拼搏而前行
 */
@Service
public class OperateServerImpl extends BaseOperate implements OperateServer {

    private List<ZjBean> results = new ArrayList<ZjBean>();

    public OperateServerImpl() {
        super("operate", "jdbc");
    }

    @Override
    public List<OperateBean> queryOperateList(OperateParameter operateParameter) {
        return queryList("queryOperateList", operateParameter);
    }

    @Override
    public int queryOperateCount(OperateParameter operateParameter) {
        return queryOne("queryOperateCount", operateParameter);
    }

    @Override
    public List<ModuleBean> getModuleBmbm() {
        return queryList("getModuleBmbm");
    }

    @Override
    public List<OperateBean> getDurationList(OperateParameter operateParameter) {
        return queryList("getDurationList", operateParameter);
    }

    @Override
    public int getDurationCount(OperateParameter operateParameter) {
        return queryOne("getDurationCount", operateParameter);
    }

    @Override
    public List<OperateBean> getOperaInfoList(OperateParameter operateParameter) {
        return queryList("getOperaInfoList", operateParameter);
    }

    @Override
    public int getOperaInfoCount(OperateParameter operateParameter) {
        return queryOne("getOperaInfoCount", operateParameter);
    }

    @Override
    public OperateBean getXmdurTj(OperateParameter operateParameter) {
        return queryOne("getXmdurTj", operateParameter);
    }

    @Override
    public List<ZjBean> queryDatatjsxList(OperateParameter operateParameter) {
        return queryList("queryDatatjsxList", operateParameter);
    }

    @Override
    public int queryDatatjsxCount(OperateParameter operateParameter) {
        return queryOne("queryDatatjsxCount", operateParameter);
    }

    @Override
    public List<ZjBean> queryDatatbzlList(OperateParameter operateParameter) {
        return queryList("queryDatatbzlList", operateParameter);
    }

    @Override
    public int queryDatatbzlCount(OperateParameter operateParameter) {
        return queryOne("queryDatatbzlCount", operateParameter);
    }

    @Override
    public List<ZjBean> queryDataWzxList(OperateParameter operateParameter) {
        return queryList("queryDataWzxList", operateParameter);
    }

    @Override
    public int queryDataWzxCount(OperateParameter operateParameter) {
        return queryOne("queryDataWzxCount", operateParameter);
    }

    @Override
    public List<ModuleBean> getBmbmTreeByXmlx(String flag) {
        if ("tbjsx".equals(flag)) {
            return queryList("getBmbmTreeByXmlx", flag);
        } else if ("datawzx".equals(flag)) {
            return queryList("getBmbmTreeByXmlxDatawzx", flag);
        } else if ("datasbbl".equals(flag)) {
            return queryList("getBmbmTreeByXmlxDatasbbl", flag);
        }
        return null;
    }

    @Override
    public List<ZjBean> queryDatasbblList(OperateParameter operateParameter) {
        return queryList("queryDatasbblList", operateParameter);
    }

    @Override
    public int queryDatasbblCount(OperateParameter operateParameter) {
        return queryOne("queryDatasbblCount", operateParameter);
    }

    @Override
    public List<ZjBean> queryDatathlvList(OperateParameter operateParameter) {
        return queryList("queryDatathlvList", operateParameter);
    }

    @Override
    public int queryDatathlvCount(OperateParameter operateParameter) {
        return queryOne("queryDatathlvCount", operateParameter);
    }

    @Override
    public List<ZjBean> queryDataJcwtbList(OperateParameter operateParameter) {
        return queryList("queryDataJcwtbList", operateParameter);
    }

    @Override
    public int queryDataJcwtbCount(OperateParameter operateParameter) {
        return queryOne("queryDataJcwtbCount", operateParameter);
    }

    @Override
    public List<ZjBean> queryDatatbAccuracy(OperateParameter operateParameter) {
        return queryList("queryDatatbAccuracy", operateParameter);
    }

    @Override
    public int queryDatatbAccuracyCount(OperateParameter operateParameter) {
        return queryOne("queryDatatbAccuracyCount", operateParameter);
    }

    @Override
    public List<ZjBean> queryLoginNumList(OperateParameter operateParameter) {
        return queryList("queryLoginNumList", operateParameter);
    }

    @Override
    public int queryLoginNumCount(OperateParameter operateParameter) {
        return queryOne("queryLoginNumCount", operateParameter);
    }

    @Override
    public List<SjbbMessage> exportDatatjsx(OperateParameter operateParameter) {
        return queryList("exportDatatjsx", operateParameter);
    }

    @Override
    public List<SjbbMessage> exportDatasbbl(OperateParameter operateParameter) {
        return queryList("exportDatasbbl", operateParameter);
    }

    @Override
    public List<SjbbMessage> exportOperateList(OperateParameter operateParameter) {
        return queryList("exportOperateList", operateParameter);
    }

    @Override
    public List<SjbbMessage> exportLoginNum(OperateParameter operateParameter) {
        return queryList("exportLoginNum", operateParameter);
    }

    @Override
    public List<SjbbMessage> exportDuration(OperateParameter operateParameter) {
        return queryList("exportDuration", operateParameter);
    }

    @Override
    public List<SjbbMessage> exportDataJcwtb(OperateParameter operateParameter) {
        return queryList("exportDataJcwtb", operateParameter);
    }

    @Override
    public List<SjbbMessage> exportDatathlv(OperateParameter operateParameter) {
        return queryList("exportDatathlv", operateParameter);
    }

    @Override
    public List<SjbbMessage> exportDatatbAccuracy(OperateParameter operateParameter) {
        return queryList("exportDatatbAccuracy", operateParameter);
    }

    @Override
    public List<SjbbMessage> exportDataWzx(OperateParameter operateParameter) {
        return queryList("exportDataWzx", operateParameter);
    }
}
